package com.lng.order

import android.content.Intent
import android.support.v4.app.Fragment
import android.os.Bundle
import android.support.v4.content.LocalBroadcastManager
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import kotlinx.android.synthetic.main.fragment_order_list.*

/**
 * A placeholder fragment containing a simple view.
 */
class OrderListActivityFragment : Fragment() {

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                              savedInstanceState: Bundle?): View? {
        return inflater.inflate(R.layout.fragment_order_list, container, false)
    }

    override fun onActivityCreated(savedInstanceState: Bundle?) {
        super.onActivityCreated(savedInstanceState)
        orderListTV.setOnClickListener {
            var localBroadcastManager = LocalBroadcastManager.getInstance(activity!!)
            var intent = Intent("LOCAL_ACTION")
            intent.putExtra("aa",10001)
            localBroadcastManager.sendBroadcast(intent)
        }
    }
}
